package com.stropheware.droidDefense;

import android.app.Activity;
import android.content.Context;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;


/*
 * Dynamically create the achievements screen/activity
 */
public class AchievementActivity extends Activity {
	
	private AchievementManager achievementManager;
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		achievementManager = new AchievementManager();
		initWindow();
		ScrollView scrollView = new ScrollView(this);
		LinearLayout linearLayout = (LinearLayout) View.inflate(this, R.layout.achievements, null);
		linearLayout.addView(scrollView);
		TextView tv;
		for(int i=0; i < 100; i++) {
			tv = new TextView(this);
			tv.setText("test" + i);
			linearLayout.addView(tv);
		}
		setContentView(linearLayout);
	}
	
	private void initWindow() {
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
	}

}

